shell script for loop
code:a.sh
for s in a b c
do
echo "Looping $s"
done
code:a.sh
for ((i=0;i<2;i++))
do
done
code:a.sh
for i in seq 3
do
echo ${i}
done
# seq 0 3 だと0始まり
code:a.sh
cat a.txt | while read line
do
echo $line
done # continue もつかえる
? shell scriptの(for|loop)
code:a.sh
do
echo 1
done
code:a.sh
cat file_name | while read line
do; echo $line
done
| whileで抜けるには, exit
cat fileを (command)に置き換えてもよい